As a technique in a related art (for example, Patent Literature 1) to detect a moving object such as a pedestrian and a vehicle, a pattern matching is applied to a photographic image obtained by capturing an image in front of or around a vehicle using an onboard camera. According to the technique in the related art, a template (a pedestrian template) representing a characteristic figure of a pedestrian and a template (a vehicle template) representing a characteristic figure of a vehicle are stored, and a moving object in the photographic image is detected by extracting a portion matching the templates from the photographic image.
A moving object such as a pedestrian and a vehicle may be everywhere in the photographic image. In order to avoid omission detection of a moving object, it is necessary to extract portions matching the templates by searching everywhere in the photographic image while moving positions of the templates in the photographic image little by little. In addition, moving objects may be of any size in the photographic image. It is necessary to detect moving objects in the photographic image by preparing templates of various sizes and moving a position of the templates of various sizes in the photographic image little by little.
The inventor of the present application has found the followings. When all portion of the photographic image is searched thoroughly with templates of various sizes, a search time may become too long to detect a moving object quickly.